package com.qf.mapper;

import com.qf.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface UserMapper {

    List<User> findAll();

    @Update("update user set money = money - #{money} where id = #{outId}")
    void unaddMoney(@Param("outId") Integer outId, @Param("money") Integer money);

    @Update("update user set money = money + #{money} where id = #{inId}")
    void addMoney(@Param("inId") Integer inId, @Param("money") Integer money);
}
